package com.aurora.app.entity;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.aurora.base.entity.BaseEntity;

@Entity
@Table(name="tb_volunteer")
public class Volunteer extends BaseEntity {
	private User user;
	private FreeTime freeTime;
	private String qrCode;
	@ManyToOne(cascade = {CascadeType.REFRESH}, optional = false, fetch = FetchType.LAZY)
	@JoinColumn(name = "f_user_id")
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	@ManyToOne(cascade = {CascadeType.REFRESH}, optional = false, fetch = FetchType.LAZY)
	@JoinColumn(name = "f_free_time_id")
	public FreeTime getFreeTime() {
		return freeTime;
	}
	public void setFreeTime(FreeTime freeTime) {
		this.freeTime = freeTime;
	}
	@Column(name="f_qrcode")
	public String getQrCode() {
		return qrCode;
	}
	public void setQrCode(String qrCode) {
		this.qrCode = qrCode;
	}
}
